package com.yunhe.portal.repository;
import com.yunhe.portal.domain.DataNewsInfo;
import com.yunhe.portal.model.DataNewsInfoVo;
import com.yunhe.portal.model.NewsAndNotice;
import com.yunhe.portal.model.NewsInfoQueryCondition;
import com.yunhe.portal.model.PhoneQueryCondition;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;

/**
 * @description 新闻表
 * @author misty
 * @date 2021-10-19
 */
@Repository
public interface DataNewsInfoRepository {

    /**
     * 新增
     * @author misty
     * @date 2021/10/19
     **/
    int createDataNewsInfo(DataNewsInfo dataNewsInfo);

    /**
     * 新增
     * @author misty
     * @date 2021/10/19
     **/
    int createDataNewsInfoSelective(DataNewsInfo dataNewsInfo);

    /**
     * 刪除
     * @author misty
     * @date 2021/10/19
     **/
    int deleteDataNewsInfoByPrimaryKey(@Param("id") int id);

    /**
     * 更新
     * @author misty
     * @date 2021/10/19
     **/
    int updateDataNewsInfoByPrimaryKey(DataNewsInfo dataNewsInfo);

    /**
     * 更新
     * @author misty
     * @date 2021/10/19
     **/
    int updateDataNewsInfoByPrimaryKeySelective(DataNewsInfo dataNewsInfo);

    /**
     * 根据主键查询
     * @author misty
     * @date 2021/10/19
     **/
    DataNewsInfo searchDataNewsInfoByPrimaryKey(@Param("id") int id);


    /**
     * web根据条件查询新闻列表
     * @param newsInfoQueryCondition
     * @return
     */
    List<DataNewsInfoVo> findDataNewsInfoByCondition(NewsInfoQueryCondition newsInfoQueryCondition);

    void publishTimedNew();

    List<DataNewsInfoVo> findPhonesNewsByCondition(PhoneQueryCondition phoneQueryCondition);

    List<NewsAndNotice> getNewsAsUrl(@Param("keyword") String keyword);
}